﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<FarmerStore.Models.Product>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    产品 - <%: Model.Title %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="submain">
        <h2>
            <%: Model.Title %>
        </h2>

        <p>
            <img alt="<%: Model.Title %>" src="<%: Model.ArtUrl%>" />
        </p>

        <div id="product-details">
            <p>
                <em>类别:</em>
                <%: Model.Name %>
            </p>
            <p>
                <em>商家:</em>
                <%: Model.Name %>
            </p>
            <p>
                <em>价格:</em>
                <%: String.Format("{0:F}", Model.Price) %>
            </p>
            <p>
                <em>折扣:</em>
                <%: String.Format("{0:F}", Model.Discount) %>
            </p>
            <p class="button">
                <%: Html.ActionLink("加入购物车", "AddToCart", "ShoppingCart", 
                    new { id = Model.Id }, "")%>
            </p>
        </div>
    </div>
</asp:Content>
